package com.zym.field_method09;

public class Goods {//商品类
    //唯一标识
    private int id;//唯一标识

    private double price;//价格

    private String goodsName;//商品名称

    private String remarks;//描述信息


    //私有属性的get/set
    public void setId(int idParam){
        id = idParam;
    }

    public int getId(){
        return id;
    }

    public void setGoodsName(String goodsNameParam){
        goodsName = goodsNameParam;
    }

    public String getGoodsName(){

        return goodsName;
    }
    //省略.....

    //类本身的方法 ----->

    //类里面至少有一个 无参构造器
    public Goods(){

    }


    public Goods(int idParam,double priceParam,
                 String goodsNameParam,String remarksParam){

        id = idParam;
        price = priceParam;
        goodsName = goodsNameParam;
        remarks = remarksParam;

    }
}
